using UnityEngine;

/// <summary>
/// 适配常量
/// 竖版游戏UI固定宽度
/// 横版游戏UI固定高度
/// </summary>
public static class AdaptiveConst
{
    /// <summary>
    /// 像素单位
    /// </summary>
    public const int PixelsPerUnit = 100;

    /// <summary>
    /// 标准分辨率
    /// </summary>
    public static Vector2 StandardResolution = new Vector2(1080, 1920);
    /// <summary>
    /// 地图分辨率
    /// </summary>
    public static Vector2 FullMapResolution = new Vector2(1472, 2368);

    /// <summary>
    /// 高度固定适配 1920V
    /// </summary>
    public const int MatchHeight = 1;
    /// <summary>
    /// 宽度固定适配 1080V
    /// </summary>
    public const int MatchWidth = 0;

    /// <summary>
    /// 正交大小 1920H
    /// </summary>
    public static float OrthographicSize_1920H = StandardResolution.y / 2 / PixelsPerUnit;
    /// <summary>
    /// 正交大小 2368H
    /// </summary>
    public static float OrthographicSize_2368H = FullMapResolution.y / 2 / PixelsPerUnit;

    /// <summary>
    /// 基准高宽比
    /// 16:9 = 1.7778
    /// </summary>
    public static float StandardAspectRatio = StandardResolution.y / StandardResolution.x;
    /// <summary>
    /// 当前高宽比
    /// </summary>
    public static float CurrAspectRatio = (float)Screen.height / Screen.width;
}